[Template:scriptincludes.html]
<script>

	$(function() {	
		$("#tabs").tabs();					
	}); 

$(document).ready(function(){
    var cmdget = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?cmd=runsql&itemid=[<tag type="valueof" xpath="genxml/hidden/itemid" />]';
	$.fn.initlist('#repoutput', '.ajaxbutton', cmdget);				
});

</script>

				<div class="nwb-button-container">
				[<tag id="cmdReturn" type="linkbutton" text=" Return" tooltip="Return" cssclass="nwb-button danger" commandname="Cancel" commandargument="ItemID" />]
				</div>
		<div id="tabs">
			<ul>
				<li><a href="#tabs-1">Results</a></li>
				<li><a href="#tabs-2">Edit SQL</a></li>
			</ul>
			<div id="tabs-1">		

				<div id="repoutput">
				<h1>LOADING REPORT.....</h1>
				</div>

			</div>
			<div id="tabs-2">

			
				<div class="nwb-button-container">
				[<tag id="cmdUpdate1" type="linkbutton" viewinrole="Admin" text=" Update" tooltip="Update" cssclass="nwb-button primary icon approve" commandname="Update" commandargument="ItemID"/>]
				[<tag id="cmdDelete1" type="linkbutton" viewinrole="Admin" text=" Delete" tooltip="Delete" cssclass="nwb-button danger icon remove" commandname="Delete" commandargument="ItemID" confirm="Delete Item?" />]
				</div>
				<div>
				[<tag id="ItemID" type="hidden" value="" />]
				[<tag id="LockedBy" type="hidden" value="" />]
				[<tag id="DisplayLockedBy" type="hidden" value="" />]
				[<tag type="valueof" xpath="genxml/hidden/displaylockedby" />]
				<h2>Name : </h2>
				[<tag id="txtName" type="textbox" width="300" maxlength="40" />]
				<h2>Summary : </h2>
				[<tag id="txtSummary" type="textbox" height="80" width="100%" maxlength="250" textmode="MultiLine" />]
				<h2>SQL : </h2>
				[<tag id="txtSQL" viewinrole="Admin" type="textbox" height="500" width="100%" textmode="MultiLine" />]
				</div>
				<br />
				Last Modified : [<tag type="valueof" databind="ModifiedDate" />]

			</div>
		</div>
